/**
 * 
 */
package edu.byu.nlp.pipes;

/**
 * @author robbie
 *
 */
public class PipeAndData<IL, ID, OL, OD> {

	private final Iterable<Instance<OL, OD>> data;
	private final Pipe<IL, ID, OL, OD> pipe;
	
	private PipeAndData(Iterable<Instance<OL, OD>> data, Pipe<IL, ID, OL, OD> pipe) {
		this.data = data;
		this.pipe = pipe;
	}

	public Pipe<IL, ID, OL, OD> getPipe() {
		return pipe;
	}
	
	public Iterable<Instance<OL, OD>> getOutput() {
		return data;
	}

	public static <IL, ID, OL, OD> PipeAndData<IL, ID, OL, OD> from(Iterable<Instance<OL, OD>> data,
			Pipe<IL, ID, OL, OD> pipe) {

		return new PipeAndData<IL, ID, OL, OD>(data, pipe);
	}
	
}
